<?php

/*
 * 文件说明.
 * 
 * @author Kun Xu <kunx@jumei.com>
 */

/**
 * Description of BsForm
 *
 * @author 坤
 */
Yii::import('bootstrap.form.TbForm');

class BsForm extends TbForm
{
    public $formType = 'inline'; //vertical, inline, horizontal and search.

    public function renderButtons()
    {
        $output = '';
        foreach ($this->getButtons() as $button)
            $output.=$this->renderElement($button);
        if (in_array($this->formType, array('inline', 'search'))) {
            return $output;
        } else {
            return $output !== '' ? '<div class="form-actions">' . $output . '</div>' : '';
        }
    }

}
